package com.moioo.exam;

/**
 * TRoelAuthorId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class TRoelAuthorId implements java.io.Serializable {

	// Fields

	private Integer mid;
	private Integer roleid;

	// Constructors

	/** default constructor */
	public TRoelAuthorId() {
	}

	/** full constructor */
	public TRoelAuthorId(Integer mid, Integer roleid) {
		this.mid = mid;
		this.roleid = roleid;
	}

	// Property accessors

	public Integer getMid() {
		return this.mid;
	}

	public void setMid(Integer mid) {
		this.mid = mid;
	}

	public Integer getRoleid() {
		return this.roleid;
	}

	public void setRoleid(Integer roleid) {
		this.roleid = roleid;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TRoelAuthorId))
			return false;
		TRoelAuthorId castOther = (TRoelAuthorId) other;

		return ((this.getMid() == castOther.getMid()) || (this.getMid() != null
				&& castOther.getMid() != null && this.getMid().equals(
				castOther.getMid())))
				&& ((this.getRoleid() == castOther.getRoleid()) || (this
						.getRoleid() != null
						&& castOther.getRoleid() != null && this.getRoleid()
						.equals(castOther.getRoleid())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getMid() == null ? 0 : this.getMid().hashCode());
		result = 37 * result
				+ (getRoleid() == null ? 0 : this.getRoleid().hashCode());
		return result;
	}

}